package trade.axht.web;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import trade.axht.entity.TbAboutus;
import trade.axht.service.ITbAboutusService;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Yanghu
 * @since 2017-02-25
 */
@Controller
@RequestMapping("/tbAboutus")
public class TbAboutusController {

    @Autowired
    private ITbAboutusService tbAboutusService;

    @RequestMapping(value = "/getList")
    @ResponseBody
    public Map<String, Object> aboutusList(){
        Map<String, Object> map = new HashMap<String, Object>();
        List<TbAboutus> aboutuses = tbAboutusService.selectList(new EntityWrapper<TbAboutus>().isNotNull("id"));
        map.put("listOfAboutus", aboutuses);
        return map;
    }

}
